<?
$availPlayers = getAPL($leagueId);
$lastTeam = "";
?>
<br>
<br>
<br>
<table align="center" width="85%"><tr>
	<?$count = count($availPlayers);
	$count2 = -1;
	for ($i = 0; $i < $count; $i++) {?>
	<?if ($availPlayers[$i]->team != $lastTeam) {?>
		<?if ($lastTeam != "") {?>
		</table>
		</td>
		<?}?>
	<?if ($count2 < 2) {
		$count2++;
		?>
		<td valign="top" width="33%"><table width="100%"><tr><td><br><br><h2><?echo getAFLTeam($availPlayers[$i]->team);?></h2></td></tr>
	<?} else {
		$count2 = 0;
		?>
	</tr><tr><td valign="top" width="33%"><table width="100%"><tr><td><br><br><h2><?echo getAFLTeam($availPlayers[$i]->team);?></h2></td></tr>
	<?}?>
	<?
	$lastTeam = $availPlayers[$i]->team;
	?>
	<?}?>
	<tr>
	<td><?echo getPlayerDisplayForAPL($availPlayers[$i], false)?></td>
	</tr>
	<?}?>
	</table>
	</td></tr>
</table>
